home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1988 September / Ahoy_Magazine_88-09_1988_Double_L.d64 / Trap Shoot (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  2KB  |  61 lines

  1. 10 ifa=0thena=1:print"[147]"spc(11)"leave disk in drive":load"trap.sprts",8,1
  2. 20 poke53280,0:d$="":fort=1to40:d$=d$+"":c$=c$+" ":next:print"[147]"
  3. 30 gosub530:poke53281,14:print"[147][146]  [164][175][185][185][184][183]   [184][146][185][164]"spc(30)"[163][163][183][183][183][183][183][184][184][184][183]"
  4. 40 a$="[164][175][185][162][185][175][185][175]":fort=1to5:w$=w$+a$:next
  5. 50 printspc(21)"[145][164][175][175][185][162][184][163]  [183][184][184][184][146][185][175][164]"spc(23)"[163][163][163][163][163][183][183][183][183][163][163][163][163]"
  6. 60 printspc(9)"[164][164][175][175][185][185][175][164][164]     [164][175][175][185][185][185][175][175][164][164]"
  7. 70 printspc(6)"[155][164][164]    [160][164][164][164]   [164][164][175][164][164]     [160][164][164]   [164]"
  8. 80 a$=c$+c$:printleft$(d$,11)"[149]"w$"[159]"c$""a$"[159]"a$a$""a$a$a$;
  9. 90 v=53248:pokev+28,103:pokev+37,9:pokev+38,7:fort=0to6:readw,a
  10. 100 pokev+t+39,w:poke2040+t,a:next:fort=0to13:readw:pokev+t,w:next
  11. 110 fort=832to1023:poket,0:next:poke832,14:poke896,28:poke899,62:poke960,62
  12. 120 poke963,127:u=54272:pokeu+24,15:pokev+29,96
  13. 130 fort=0to4:reada$(t):next
  14. 140 iftt>29thenfort=1to600:next:goto430
  15. 150 fort=1to400:next:pokev+4,175:pokev+5,140:pokev+21,231:fort=1to1100:next
  16. 160 b=0:a=89:q=23:k=195:h%=rnd(1)*2:z=140:w%=rnd(1)*150+100:ae=3+df/2:s=0
  17. 170 h%=110+h%*145:ifh%=w%then160
  18. 180 gosub510:m=(k-z)/(h%-w%):b=k-m*h%:y=k:ab=rnd(.6)+.4:h=0:tt=tt+1
  19. 190 j=peek(56320):f=jand16:j=jand15:j=15-j:a=peek(v+4):w=peek(v+5)
  20. 200 print" [158] shells"tc-s"[157] [153] hit"ht"[157] of"tt-1"[157] [146]  used"ts"[157] [145]"
  21. 210 c=0:d=0:ifjand4anda>97thenc=-gs
  22. 220 ifjand8anda<250thenc=gs
  23. 230 ifjand1andw>60thend=-gs
  24. 240 ifjand2andw<185thend=gs
  25. 250 iff<>16ands<tcthen330
  26. 260 pokev+4,peek(v+4)+c:pokev+5,peek(v+5)+d
  27. 270 ac=ac+1:ifac<3then190
  28. 280 ac=0:y=y-ae:x=(y-b)/m:w=15:ify<167thenw=14:ify<152thenw=13:ab=-abs(ab*1.1)
  29. 290 poke2043,w:poke2044,w:ifw<>14thenh=h+ab*(3+df/3)
  30. 300 ifh<0thenpokev+21,231:goto140
  31. 310 pokev+7,y-h:pokev+9,y:pokev+6,x:pokev+8,x:ae=ae*.93:pokev+21,255
  32. 320 pokev+4,peek(v+4)+c:pokev+5,peek(v+5)+d:goto190
  33. 330 pokev+21,235:pokev+1,201:s=s+1:ts=ts+1
  34. 340 q=28:a=3:w=8:gosub510:pokev+1,200
  35. 350 w=abs(peek(v+4)-x):a=peek(v+5)-y+h:c=15-peek(2043)
  36. 360 ifw>c*2andw<12-c*2anda>-14+c*2anda<-9then380
  37. 370 ac=2:pokev+21,255:goto260
  38. 380 pokev+6,x-9:pokev+7,y-8-h:fort=194to196
  39. 390 poke2043,t:forw=1to70:nextw,t:pokev+7,0:pokev+21,227:ht=ht+1:poke2043,15
  40. 400 goto140
  41. 410 data 2,192,,193,,198,1,13,0,13,0,197,0,197,175,200,175,221,,,,,,,92
  42. 420 data195,235,195,terrible,bad,about average,well,like a pro
  43. 430 poke53281,2:pokev+21,0:pokeu+24,0
  44. 440 w%=ht/tt*100:print"[147][158]"spc(6)"you shot"w%"[157]% of the targets."
  45. 450 a%=ht/ts*100:printspc(5)"of the shells fired,"a%"[157]% hit."
  46. 460 a$="you shoot "+a$((a%+w%)/50)+".":printspc(20-len(a$)/2)a$
  47. 470 print"":a$="        hit anything to continue        [145]"
  48. 480 print"[158]"a$;
  49. 490 getb$:ifb$<>""thenclr:goto20
  50. 500 print"[155]"a$;:goto480
  51. 510 pokeu+4,0:pokeu+5,0:pokeu+4,128:pokeu+5,q:pokeu+1,a:pokeu,w:pokeu+4,129
  52. 520 return
  53. 530 df=1:tc=2:poke53281,7
  54. 540 print""spc(10)"1.  difficulty "df
  55. 550 printspc(10)"2. "tc"shells per target"
  56. 560 printspc(10)"3.  begin game"
  57. 570 geta$:a=val(a$):ifa=1thendf=df+1:ifdf=5thendf=1
  58. 580 ifa=2thentc=tc+1:iftc=5thentc=1
  59. 590 ifa=3thengs=3+df/2:return
  60. 600 goto540
  61.